Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

QuickTime VR Movie Creation

A QuickTime VR movie file is a QuickTime movie file. The only differences between a QuickTime VR movie file and a typical time-based QuickTime movie file are the type and usage of the tracks contained in the movie and the necessary QuickTime user data attached to the movie. In particular, for the Mac OS, the file type should be 'MooV' ; for multiple platform compatibility, the file extension should be .mov .

When you create a QuickTime VR movie, you need to add a special piece of user data that identifies which movie controller to invoke for this movie. The movie controller type for QuickTime VR movies is 'qtvr' . This user data is examined by the Movie Toolbox when an application calls the NewMovieController function for that movie. Listing 5-1 shows how to add the appropriate user data to a new movie.

Listing 1 Specifying the QuickTime VR movie controller

UserData            myUserData;
OSType              controllerSubType = FOUR_CHAR_CODE('qtvr');

myUserData = GetMovieUserData(theMovie);
SetUserDataItem(myUserData, &controllerSubType,
    sizeof(controllerSubType), kQTControllerType, kQTControllerID);

The constants kQTControllerType and kQTControllerID are defined by QuickTime VR:

enum {
    kQTControllerType                           = FOUR_CHAR_CODE('ctyp').
    kQTControllerID                             = 1
};

Also, as with any QuickTime movie that is intended to be played on multiple operating systems, a data fork version of the file should be created using the FlattenMovie function with the flattenAddMovieToDataFork flag set. Note that the resulting file is optimized for random access and might not perform well in an environment that requires streaming access (such as Web browsing). The section "Optimizing QuickTime VR Movies for Web Playback" describes an export component provided by Apple that allows you to optimize a QuickTime VR file for the Web and includes the ability to store a small preview of the movie in the file.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |